package com.dingding.manager.modules.system.sql;

/**
* @ClassName: MenuSQL 
* @Description: 菜单管理Sql
* @author SUNZHICHENG 
* @date 2016年12月3日 上午10:32:14 
* @version V2.6.2
 */
public class MenuSQL {
	
	/**
	 * 根据角色名获取菜单列表 SUNZHICHENG
	 */
	public static final String QUERY_MENULIST_BY_ROLENAME=" SELECT a.*  from dd_sys_menu a ,dd_sys_role_menu b , dd_sys_role c WHERE a.sysMenuId = b.sysMenuId AND b.sysRoleId = c.sysRoleId AND c.roleEnName = ? AND a.delFlag = 0 and a.isShow = 1 ";
	
	/**
	 * 根据用户名获取菜单列表  SUNZHICHENG
	 */
	public static final String QUERY_MENULIST_BY_USERNAME=" SELECT a.*  from dd_sys_menu a ,dd_sys_role_menu b , dd_sys_role c , dd_sys_user_role d , dd_sys_user e WHERE a.sysMenuId = b.sysMenuId AND b.sysRoleId = c.sysRoleId AND c.sysRoleId = d.sysRoleId AND d.sysUserId = e.sysUserId AND e.loginName = ? AND a.delFlag = 0 and a.isShow = 1";
	
	/**
	 * 获取所有菜单列表
	 */
	public static final String QUERY_MENULIST=" SELECT * FROM dd_sys_menu a where a.delFlag = 0 ";
}
